﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Timetable.Base.Entities;
using Timetable.Base.Interfaces.Repositories;
using Timetable.Base.Interfaces.Validators;
using Ninject;

namespace Timetable.Data.Services.DataServices
{
    public class SpecialityService: BaseDataService<Speciality>
    {
        IRepository<Speciality> _repository;
        IValidator<Speciality> _validator;

        [Inject]
        public SpecialityService(IRepository<Speciality> repository, IValidator<Speciality> validator)
        {
            _repository = repository;
            _validator = validator;
        }

        public override IRepository<Speciality> Repository
        {
            get { return _repository; }
        }

        public override IValidator<Speciality> Validator
        {
            get { return _validator; }
        }

        public override IQueryable<Speciality> All()
        {
            throw new NotSupportedException();
        }

        public override Speciality GetById(int id)
        {
            return _repository.GetById(id);
        }
    }
}
